Promise.race = function (arr) {
  return new Promise(function (resolve, reject) {
    if (!Array.isArray(arr)) {
      return reject(new TypeError('Promise.race accepts an array'));
    }
    for (var i = 0, len = arr.length; i < len; i++) {
      // 主要通过直接使用, resolve 解决, 哪个先 就哪个咯
      Promise.resolve(arr[i]).then(resolve, reject);
    }
  });
};